<!DOCTYPE html>
<html lang="zh-CN">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>{{ title }}</title>
    <link href="{{ url_for('static', filename='css/4.5.2bootstrap.min.css') }}" rel="stylesheet">
    <style>
        .form-section, .result-section {
            padding: 20px;
            border-radius: 8px;
            margin-top: 20px;
        }
        .form-section {
            background-color: #f8f9fa;
            border: 1px solid #e9ecef;
        }
        .result-section {
            background-color: #ffffff;
            border: 1px solid #dee2e6;
        }
        .container {
            max-width: 600px;
        }
        .navbar {
            margin-bottom: 20px;
        }
    </style>
</head>
<body>
    <nav class="navbar navbar-expand-lg navbar-light bg-light">
        <a class="navbar-brand" href="/">饮水机数据记录</a>
        <button class="navbar-toggler" type="button" data-toggle="collapse" data-target="#navbarNav" aria-controls="navbarNav" aria-expanded="false" aria-label="Toggle navigation">
            <span class="navbar-toggler-icon"></span>
        </button>
        <div class="collapse navbar-collapse" id="navbarNav">
            <ul class="navbar-nav">
                <li class="nav-item">
                    <a class="nav-link" href="/">首页</a>
                </li>
                <li class="nav-item">
                    <a class="nav-link" href="/predict">猜一猜</a>
                </li>
            </ul>
        </div>
    </nav>

    <div class="container mt-5">
        <div class="form-section">
            <h2 class="mb-4">猜一猜</h2>
            <form action="/predict_result" method="post">
                <button type="submit" class="btn btn-primary btn-block">提交</button>
            </form>
        </div>
        {% if prediction %}
        <div class="result-section">
            <h2 class="mb-4">预测结果</h2>
            <p>{{ prediction }}</p>
        </div>
        {% endif %}
    </div>
    <script src="{{ url_for('static', filename='js/jquery-3.7.1.min.js') }}"></script>
    <script src="{{ url_for('static', filename='js/bootstrap.js') }}"></script>
</body>
</html>
